package org.jeecg.modules.wms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.wms.entity.FinishedGoodsOutbound;

import java.util.List;

/**
 * 成品出库单Mapper接口
 */
public interface FinishedGoodsOutboundMapper extends BaseMapper<FinishedGoodsOutbound> {

    /**
     * 分页查询成品出库单列表
     */
    IPage<FinishedGoodsOutbound> selectOutboundPage(Page<FinishedGoodsOutbound> page, @Param("query") FinishedGoodsOutbound query);

    /**
     * 根据客户ID查询出库单列表
     */
    List<FinishedGoodsOutbound> selectByCustomerId(@Param("customerId") String customerId, @Param("tenantId") String tenantId);

    /**
     * 根据状态查询出库单列表
     */
    List<FinishedGoodsOutbound> selectByStatus(@Param("status") Integer status, @Param("tenantId") String tenantId);

    /**
     * 统计出库单数量
     */
    Long countByStatus(@Param("status") Integer status, @Param("tenantId") String tenantId);
}
